<!--conf
<sample>
               <product version="2.5" edition="pro"/>
                       <modifications>
                               <modified date="090818"/>
                       </modifications>
               </sample>
 --> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Custom rule</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
	
</head>

<body>	
	<p>First column - min length 4<br>Second column - max length 10</p>
	<div id="gridbox" style="width:350px;height:250px;background-color:white;overflow:hidden"></div>

<script>
	dhtmlxValidation.isMin4=function(a){
		return a.length>=4;
	}
	dhtmlxValidation.isMax10=function(a){
		return a.length<=10;
	}
	mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath('../../../codebase/imgs/');
	mygrid.setHeader("Column A, Column B");
	mygrid.setInitWidths("100,250")
	mygrid.setColAlign("right,left")
	mygrid.setColTypes("ed,ed");
	mygrid.enableValidation(true,true)
	mygrid.setColValidators("Min4,Max10");
	mygrid.setColSorting("int,str")
	mygrid.enableMultiselect(true)

	mygrid.init();
	mygrid.setSkin("dhx_skyblue")
	mygrid.loadXML("../common/grid.xml");
</script>

</body>
</html>